-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GUI] RPC-Console support nested commands and simple value queries #2282
[GUI] RPC-Console support nested commands and simple value queries #2282
Conversation
Commands can be executed with bracket syntax, example: `getwalletinfo()`. Commands can be nested, example: `sendtoaddress(getnewaddress(), 10)`. Simple queries are possible: `listunspent()[0][txid]` Object values are accessed with a non-quoted string, example: [txid]. Fully backward compatible. `generate 101` is identical to `generate(101)` Result value queries indicated with `[]` require the new brackets syntax. Comma as argument separator is now also possible: `sendtoaddress,<address>,<amount>` Space as argument separator works also with the bracket syntax, example: `sendtoaddress(getnewaddress() 10) No dept limitation, complex commands are possible: `decoderawtransaction(getrawtransaction(getblock(getbestblockhash())[tx][0]))[vout][0][value]`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK d763267, but some further cleanup because of your second commit is possible.
Feel free to cherry-pick Fuzzbawls@d9e530d, or i can PR it after this is merged
With the GUI's RPC execution code being now de-duplicated, we can do some additional cleanup for CMake builds and a no-longer-needed `rpcconsole.moc` include.
Yup, nice 👍 Cherry-picked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 4fc2594
Nice PR, and even nicer code duplication refactoring! ☕ . Only for devs hehe. Have been playing with it a bit, something that would be great to add is a proper "Method not found" error description. For example, typing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 4fc2594
7f4b2a4 [RPC] Return method name with 'Method not found' errors (random-zebra) Pull request description: Simple change, to address the feature requested by @furszy here: #2282 (comment) ![Screenshot from 2021-04-08 14-03-33](https://user-images.githubusercontent.com/18186894/114023746-8bdb5400-9873-11eb-9d35-bd9ac4ce84c8.png) ACKs for top commit: furszy: Code review ACK 7f4b2a4 Fuzzbawls: ACK 7f4b2a4 Tree-SHA512: fdc6e62c469995931b996edbc325e96f7fa485b1a001b291a411582b2799df91bf711a5d913a2d3bbaacdb1776ddf0b837ac2ae2f41b6e53419871d4d811ecee
d8fe6bf [Doc] Add new GUI RPC-console syntax to release notes (random-zebra) eced57b Add help-console command to Qt debug console (Luke Mlsna) Pull request description: Follow up to #2282 First commit backports bitcoin#11698, adding: - a line to the initial message text at the top of the debug console - a pseudo-command `help-console` which is hooked after parsing the request, but before executing the RPC thread Second commit updates the release notes. ACKs for top commit: furszy: utACK d8fe6bf Fuzzbawls: ACK d8fe6bf Tree-SHA512: df415a27acb587535dfdc8775bacb231d435566bdfb18ea71863212999cf78d139b9b1eaceead5c573ace5203416d2f9392f9179ccd56b3eda1e2ab9fc3ad772
Backports a pretty cool feature for the GUI rpc-console from bitcoin#7783, which makes testing much faster, removing the need for copying/pasting the outputs of the commands.